
//#include "aa_neighborhood.h"
#include "../metric/xyz.h"
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_blas.h>

/**
   This function calculates a consistent reference frame based on
   three points.  The three points may not be co-linear.  (The results
   are undefined if the points are co-linear...)
   
   @param center  The location of the origin of the new reference frame.
   @param up      A point that will lie on the y (?) axis.
   @param third   A point that will lie on the xy plane, on a positive x coordinate.
*/
void calculate_reference_frame(struct xyz_short * center, 
			       struct xyz_short * up, 
			       struct xyz_short * third, 
			       gsl_vector * translation_vector, 
			       gsl_matrix * rotation_matrix);
void translate_and_rotate(struct xyz_short * c, gsl_vector * translation_vector, gsl_matrix * rotation_matrix);

void rotate(struct xyz_short * c, gsl_matrix * rotation_matrix);
